構築、破棄、コピー
空のコンテナー・コンストラクター
concurrent_unordered_map(); explicit concurrent_unordered_map( const allocator_type& alloc );空の
concurrent_unordered_mapを構築。バケットの初期数は未指定です。利用可能であれば、アロケーター
allocを使用してメモリーを割り当てます。
explicit concurrent_unordered_map( size_type bucket_count, const hasher& hash = hasher(), const key_equal& equal = key_equal(), const allocator_type& alloc = allocator_type() ); concurrent_unordered_map( size_type bucket_count, const allocator_type& alloc ); concurrent_unordered_map( size_type bucket_count, const hasher& hash, const allocator_type& alloc );事前割り当てされた
bucket_count個のバケットを使用して、空のconcurrent_unordered_mapを作成します。可能であれば、ハッシュ関数
hasher、プレディケートequalを使用して、key_typeオブジェクトが等しいかどうかを比較してアロケーターallocでメモリーを割り当てます。
要素のシーケンスから構築
template <typename InputIterator> concurrent_unordered_map( InputIterator first, InputIterator last, size_type bucket_count = /*implementation-defined*/, const hasher& hash = hasher(), const key_equal& equal = key_equal(), const allocator_type& alloc = allocator_type() ); template <typename Inputiterator> concurrent_unordered_map( InputIterator first, InputIterator last, size_type bucket_count, const allocator_type& alloc ); template <typename InputIterator> concurrent_unordered_map( InputIterator first, InputIterator last, size_type bucket_count, const hasher& hash, const allocator_type& alloc );半開区間
[first, last)のすべての要素を含むconcurrent_unordered_mapを作成します。半開区間
[first, last)に同じキーを持つ複数の要素が含まれている場合、どの要素が挿入されるかは未指定です。可能であれば、ハッシュ関数
hasher、プレディケートequalを使用して、key_typeオブジェクトが等しいかどうかを比較してアロケーターallocでメモリーを割り当てます。要件:
InputIteratorタイプは、[input.iterators] ISO C++ 標準のInputIterator要件を満たしている必要があります。
concurrent_unordered_map( std::initializer_list<value_type> init, size_type bucket_count = /*implementation-defined*/, const hasher& hash = hasher(), const key_equal& equal = key_equal(), const allocator_type& alloc = allocator_type() );
concurrent_unordered_map(init.begin(), init.end(), bucket_count, hash, equal, alloc)と等価です。
concurrent_unordered_map( std::initializer_list<value_type> init, size_type bucket_count, const allocator_type& alloc );
concurrent_unordered_map(init.begin(), init.end(), bucket_count, alloc)と等価です。
concurrent_unordered_map( std::initializer_list<value_type> init, size_type bucket_count, const hasher& hash, const allocator_type& alloc );
concurrent_unordered_map(init.begin(), init.end(), bucket_count, hash, alloc)と等価です。
コンストラクターをコピー
concurrent_unordered_map( const concurrent_unordered_map& other ); concurrent_unordered_map( const concurrent_unordered_map& other, const allocator_type& alloc );
otherのコピーを作成します。アロケーター引数が指定されていない場合、
std::allocator_traits<allocator_type>::select_on_container_copy_construction(other.get_allocator())を呼び出して取得できます。
otherとの同時操作が行われると動作は未定義です。
ムーブ・コンストラクター
concurrent_unordered_map( concurrent_unordered_map&& other ); concurrent_unordered_map( concurrent_unordered_map&& other, const allocator_type& alloc );ムーブ・セマンティクスを使用して、
otherの内容でconcurrent_unordered_mapを作成します。
otherは有効のままですが、未指定の状態となります。アロケーター引数が指定されていない場合、
std::move(other.get_allocator())を呼び出して取得できます。
otherとの同時操作が行われると動作は未定義です。
デストラクター
~concurrent_unordered_map();
concurrent_unordered_mapを破棄します。ストアされた要素のデストラクターを呼び出してストレージの割り当てを解除します。
*thisとの同時操作が行われると動作は未定義です。
代入操作
concurrent_unordered_map& operator=( const concurrent_unordered_map& other );
*thisのすべての要素をotherの要素をコピーして置き換えます。
std::allocator_traits<allocator_type>::propagate_on_container_copy_assignment::valueがtrueの場合、アロケーターのコピーを割り当てます。
*thisとotherの同時操作が行われると動作は未定義です。戻り値:
*thisへの参照を返します。
concurrent_unordered_map& operator=( concurrent_unordered_map&& other ) noexcept(/*See below*/);
*thisのすべての要素を、ムーブ・セマンティクスによってotherの要素で置き換えます。
otherは有効のままですが、未指定の状態となります。
std::allocator_traits<allocator_type>::propagate_on_container_move_assignment::valueがtrueの場合、アロケーターの要素を移動して割り当てます。
*thisとotherの同時操作が行われると動作は未定義です。戻り値:
*thisへの参照を返します。例外: 具体的に
noexceptは以下です。noexcept(std::allocator_traits<allocator_type>::is_always_equal::value && std::is_nothrow_move_assignable<hasher>::value && std::is_nothrow_move_assignable<key_equal>::value)
concurrent_unordered_map& operator=( std::initializer_list<value_type> init );
*thisのすべての要素をinitの要素して置き換えます。
initに同じキーを持つ複数の要素が含まれている場合、どの要素が挿入されるかは未指定です。
*thisとの同時操作が行われると動作は未定義です。戻り値:
*thisへの参照を返します。
